home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 26
/
Cream of the Crop 26.iso
/
program
/
qlib205.zip
/
QLIB.ZIP
/
TEST
/
SPAWN.C
< prev
next >
Wrap
C/C++ Source or Header
|
1997-04-13
|
1KB
|
48 lines
//this file is a mess, and will be until I can get this working under Windoze
#include <qlib.h>
#include <process.h>
#include <mem.h>
#include <stdio.h>
#include <conio.h>
#include <alloc.h>
void main(void) {
volatile dword a;
byte *newenviro[]={"env1=Cool","env2=Works!"};
printf("Total free=%d\n",coreleft());
printf("Spawn tests\n");
if (spawnle(P_WAIT,"enviro.exe","This","works!",NULL,newenviro)==ERROR) {
printf("Spawn(\"enviro\") failed!\n");
}
printf("slap a key...\n");getch();
if (spawnlp(P_WAIT,"args.exe","This","works!",NULL)==ERROR) {
printf("Spawn(\"args\") failed!\n");
}
printf("slap a key...\n");getch();
if (spawnlp(P_WAIT,"spawnbat.bAt","This","works","too",NULL)==ERROR) {
printf("Spawn(\"spawnbat.bat\") failed!\n");
}
printf("slap a key...\n");getch();
}
/*/
asm {
xor ebx,ebx
mov ah,51h
int 21h
mov a,ebx
mov es,seldata
mov ds,seldata
}
printf("ebx=%x\n",a);
/*/